<?php
$title;
$artifact_name; 
$artifact_type = $_REQUEST['artifactType'];
$artifact_id = $_REQUEST["artifactId"]; 
include("./util/artifact_title.php");
$bookmark = $config_file["web_root"] . "/" . $bookmarkbase . "/" . $artifact_id;
?>
<script type="text/javascript">
var artifactName = "<?php echo strtolower($artifact_name)?>";
var artifactStatUrl = webRoot + "/php/datahandling/artifactStatsUpdateAndRetrieve.php";
var query = "artifactId=<?php echo $artifact_id?>&artifactType=<?php echo $artifact_type?>&update=Y";
Ajax.call("POST",artifactStatUrl,query,artifactStatsCallback,false);
function backToArtifact() {
	var query = "artifactId=<?php echo $artifact_id?>&artifactType=<?php echo $artifact_type?>&update=N";
	Ajax.call("POST",artifactStatUrl,query,artifactStatsCallback,false);
}
function goBack() {
	var url = "./util/artifacts.php&artifactType=<?php echo $_REQUEST['artifactType']?>&pageNo=<?php echo $_REQUEST['pageNo']?>";
	window.parent.loadPage(url,null);
}

</script>
<h1 class='page_header'>
	<a href="./utils/artifacts.php" onclick="goBack(); return false;"><?php echo $title?></a> &gt; <?php echo $_REQUEST['artifactTitle']?>
</h1>
<div class="page-spanner">
	<div class="tab left">&nbsp;</div>
	<div class="visitor-count left">
		<span id="visitor-count"></span>
	</div>
	<div class="tab left">&nbsp;</div>
	<div id="artifact-tab" class="sub-section-inactive clickable left" onclick="showArtifact()"><strong>Back to <?php echo strtolower($artifact_name)?></strong></div>
	<div id="artifact-comment-tab" class="comment-link clickable left sub-section-active" onclick="showArtifactComments()" title="Comments"></div>
	<div class="tab left">&nbsp;</div>
	<div class="left">
	<?php
	 	include_once("./util/facebook_like.php");
	?>
	</div>
</div>
<div id="artifact-content">
	<div id="artifact-body" class="sub-section-active"><?php include($_REQUEST['pg'])?></div>
	<div id="artifact-comment-body" class="sub-section-inactive">
	<?php
	$what_type_of_comment = "comment for this " . strtolower($artifact_name);
	include_once("./util/comment.php")
	?>
	</div>
</div>